From: Jeroen van der Heijden Date: Thu, 14 Mar 2019 09:00:23 +0000 (+0100) Subject: Added makefile.targets for `make install` and `make uninstall`, upd readme.md X-Git-Tag: archive/raspbian/2.0.44-1+rpi1~1^2~3^2~6^2~16 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=98581f8285af2e4a52a52b5fded187da3bb9c922;p=siridb-server.git Added makefile.targets for `make install` and `make uninstall`, upd readme.md --- diff --git a/Debug/makefile b/Debug/makefile index 49e7070f..7f840430 100644 --- a/Debug/makefile +++ b/Debug/makefile @@ -52,9 +52,11 @@ OS := $(shell uname) ifeq ($(OS),Darwin) CRYPT := UUID := +INSTALL_PATH := /usr/local else CRYPT := -lcrypt UUID := -luuid +INSTALL_PATH := /usr endif # Add inputs and outputs from these tool invocations to the build variables diff --git a/README.md b/README.md index 1f02b937..54450e7e 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,11 @@ make test make ``` +Install +``` +sudo make install +``` + #### OSX >Make sure [libcleri](https://github.com/transceptor-technology/libcleri) is installed! @@ -77,6 +82,11 @@ make test make ``` +Install +``` +sudo make install +``` + #### Configuration SiriDB requires a configuration file to run. By default SiriDB will search for the configuration file in `/etc/siridb/siridb.conf` but alternatively you can specify a custom path by using the `-c/--config` argument. diff --git a/Release/makefile b/Release/makefile index fc01f531..02df6688 100644 --- a/Release/makefile +++ b/Release/makefile @@ -52,9 +52,11 @@ OS := $(shell uname) ifeq ($(OS),Darwin) CRYPT := UUID := +INSTALL_PATH := /usr/local else CRYPT := -lcrypt UUID := -luuid +INSTALL_PATH := /usr endif # Add inputs and outputs from these tool invocations to the build variables diff --git a/makefile.targets b/makefile.targets new file mode 100644 index 00000000..b357e0bb --- /dev/null +++ b/makefile.targets @@ -0,0 +1,11 @@ +.PHONY: install +install: + @mkdir -p /etc/siridb/ + @mkdir -p /var/lib/siridb/ + @cp -n ../siridb.conf /etc/siridb/siridb.conf + @cp siridb-server $(INSTALL_PATH)/bin/siridb-server + + +.PHONY: uninstall +uninstall: + @rm -f $(INSTALL_PATH)/bin/siridb-server